package com.ipartek.pruebas.bbddaccess;

import java.sql.*;

//ODBCCustomerDAO implementation of the 
//CustomerDAO interface. This class can contain all
//ODBC specific code and SQL statements. 
//The client is thus shielded from knowing 
//these implementation details.

public class ODBCCustomerDAO implements CustomerDAO {

public ODBCCustomerDAO() {
 // initialization 
}

// The following methods can use
// CloudscapeDAOFactory.createConnection() 
// to get a connection as required

public int insertCustomer() {
 // Implement insert customer here.
 // Return newly created customer number
 // or a -1 on error
}

public boolean deleteCustomer() {
 // Implement delete customer here
 // Return true on success, false on failure
}

public Customer findCustomer() {
 // Implement find a customer here using supplied
 // argument values as search criteria
 // Return a Transfer Object if found,
 // return null on error or if not found
}

public boolean updateCustomer() {
 // implement update record here using data
 // from the customerData Transfer Object
 // Return true on success, false on failure or
 // error
}

public RowSet selectCustomersRS() {
 // implement search customers here using the
 // supplied criteria.
 // Return a RowSet. 
}

public Collection selectCustomersTO() {
 // implement search customers here using the
 // supplied criteria.
 // Alternatively, implement to return a Collection 
 // of Transfer Objects.
}
//...
}
